<template>
  <div>
    <el-form :label-position="labelPosition" :model="formLabelAlign" label-width="80px">
      <el-form-item label="航班号">
        <el-input v-model="formLabelAlign.airlineNumber"></el-input>
      </el-form-item>
      <el-form-item label="起飞城市">
        <el-input v-model="formLabelAlign.beginCity"></el-input>
      </el-form-item>
      <el-form-item label="起飞机场">
        <el-input v-model="formLabelAlign.beginAirport"></el-input>
      </el-form-item>
      <el-form-item label="起飞时间">
        <el-input v-model="formLabelAlign.beginTime"></el-input>
      </el-form-item>
      <el-form-item label="目的城市">
        <el-input v-model="formLabelAlign.lastCity"></el-input>
      </el-form-item>
      <el-form-item label="目的机场">
        <el-input v-model="formLabelAlign.lastAirport"></el-input>
      </el-form-item>
      <el-form-item label="到达时间">
        <el-input v-model="formLabelAlign.lastTime"></el-input>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="reset('dataAddForm')">重置</el-button>

      <el-button type="primary" @click="handleAdd()">确定</el-button>

    </div>
  </div>
</template>

<script>
export default {
  name: "AirlineAdd",
  data() {
    return {
      labelPosition: 'left',
      formData: {},
      formLabelAlign: {}
    }
  },
  created() {
  },
  methods: {
    reset() {
      this.formLabelAlign = {}
    },
    //添加
    handleAdd() {
      this.axios.post("/airline/add", this.formLabelAlign).then(res => {
        // 判断当前操作是否成功
        if (res.data.code === 200) {
          this.$message.success(res.data.msg);
        } else {
          this.$message.error(res.data.msg);
        }
      });
    },
  }
}
</script>

<style scoped>

</style>